<template>
  <div>
    <h1>mutations</h1>
    <p>count: {{$store.state.count}}</p>
    <p >msg: {{$store.state.msg}}</p>
    <!-- 通过 $store.commit执行 store.mutations 的方法 -->
    <button @click="$store.commit('add',10)">+</button>
    <button @click="$store.commit('reduce')">-</button>
    <button @click="$store.commit('addStr',666)">add6</button>
  </div>
</template>


